﻿<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport"
        content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0" />
    <meta name="author" content="火星科技 http://cesium.marsgis.cn ">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="x5-fullscreen" content="true">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />

    <!-- 标题及搜索关键字 -->
    <meta name="keywords" content="火星科技,cesium,3D,GIS,marsgis,三维,地球,地图,开发,框架,系统,示例,资料,模型,离线,外包,合肥,安徽,中国" />
    <meta name="description"
        content="火星科技 合肥火星 合肥火星科技 合肥火星科技有限公司 leaflet leaflet框架 leaflet开发 cesium cesium开发 cesium框架 三维 地球 模型  gis marsgis 地图离线 地图开发 地图框架 地图外包 框架 开发 外包  地图离线 二维地图 三维地图 全景漫游 地理信息系统 云GIS 三维GIS GIS平台 WebGIS" />

    <link rel="shortcut icon" type="image/x-icon" href="http://cesium.marsgis.cn/favicon.ico">
    <title>EPSG4490 大地2000 坐标系瓦片地图 |Mars3D ( MarsGIS for Cesium )|三维地图| 火星科技|合肥火星科技|合肥火星科技有限公司</title>



    <!--第三方lib-->
    <script type="text/javascript" src="../lib/include-lib.js" libpath="../lib/"
        include="jquery,font-awesome,bootstrap,layer,haoutil,mars3d"></script>

    <link href="css/style.css" rel="stylesheet" />
</head>

<body class="dark">
    <div id="cesiumContainer" class="mars3d-container"></div>



    <script type="text/javascript">
        $(document).ready(function () {
            if (!mars3d.util.webglreport()) {
                alert('系统检测到您使用的浏览器不支持WebGL功能');
                layer.open({
                    type: 1,
                    title: "当前浏览器不支持WebGL功能",
                    closeBtn: 0,
                    shadeClose: false,
                    resize: false,
                    area: ['600px', '200px'], //宽高
                    content: '<div style="margin: 20px;"><h3>系统检测到您使用的浏览器不支持WebGL功能！</h3>  <p>1、请您检查浏览器版本，安装使用最新版chrome、火狐或IE11以上浏览器！</p> <p>2、WebGL支持取决于GPU支持，请保证客户端电脑已安装显卡驱动程序！</p></div>'
                });
            }
            initMap();
        });



        var viewer
        function initMap() {


            //下载的EPSG4326【谷歌地球】数据 
            var imageryProvider = mars3d.layer.createImageryProvider({
                "type": "tile",
                "url": serverURL + "/maptile/google_earth/{z}/{x}/{y}.jpg",
                "crs": "4490",
                "minimumLevel": 0,
                "maximumLevel": 5,
            });



            //构造地球
            viewer = new Cesium.Viewer("cesiumContainer", {
                animation: false,        //是否创建动画小器件，左下角仪表
                timeline: false,         //是否显示时间线控件
                geocoder: false,         //是否显示地名查找控件

                baseLayerPicker: false,  //是否显示图层选择控件
                imageryProvider: imageryProvider
            });


            //火星对viewer的扩展
            viewer.mars = new mars3d.ViewerEx(viewer, {
                contextmenu: true,
                center: {"y":32.776099,"x":117.883297,"z":871185.52,"heading":354.7,"pitch":-63.7,"roll":360},
                mouseZoom: true,
                location: {
                    format: "<div>经度:{x}</div> <div>纬度:{y}</div> <div>海拔：{z}米</div> <div>方向：{heading}度</div> <div>视高：{height}米</div>"
                },
                navigation: {
                    compass: { top: "10px", right: "5px" }
                },
            });


            //国家天地图-wmts服务
            var layer = mars3d.layer.createLayer(viewer,{
                "name": "xyz图层",
                "type": "tile",
                "url": "http://t3.tianditu.gov.cn/img_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={z}&layer=img&style=default&tilerow={y}&tilecol={x}&tilematrixset=c&format=tiles&tk=6c99c7793f41fccc4bd595b03711913e",
                "crs": "4490",
                "visible": true
            });

 
            //山西卫星-wmts服务
            // var layer = mars3d.layer.createLayer(viewer,{
            //     "name": "xyz图层",
            //     "type": "tile",
            //     "url": "http://shanxi.tianditu.gov.cn/service/SX_DOM/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=WD_DOM&STYLE=WD_DOM&TILEMATRIXSET=Matrix_WD_DOM_0&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Ftile",
            //     // "rectangle": { "xmin": 109.6875, "xmax": 115.3125, "ymin": 33.75, "ymax": 42.1875 },
            //     "crs": "4490",
            //     "minimumLevel": 0,
            //     "maximumLevel": 18,
            //     "visible": true,
            //     "proxy": "http://data.marsgis.cn/proxy/",  //代理服务，解决跨域问题
            // });



            //山东影像-仿WMTS
            var layer = mars3d.layer.createLayer(viewer,{
                "name": "山东影像",
                "type": "tile",
                "url": "http://www.sdmap.gov.cn/tileservice/SDPubMap?layer=SDPubMap&style=default&tilematrixset=default028mm&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix={z}&TileCol={x}&TileRow={y}",
                "crs": "4490",
                "rectangle": { "xmin": 114.300, "xmax": 123.20, "ymin": 34.165, "ymax": 38.626 },
                "minimumLevel": 5,
                "maximumLevel": 18,
                "alpha": 1,
                "queryParameters": { //可以传自定义url参数，如token等
                    "token": "test",
                },
                "visible": true,
            });



            //某测试影像-geowebcache wmts
            // var layer = mars3d.layer.createLayer(viewer,{
            //     "type": "xyz",
            //     "crs": "EPSG:4490",
            //     "url": "http://47.106.133.145:20000/geowebcache/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=arcgis-China&STYLE=_null&FORMAT=image/jpeg&TILEMATRIXSET=EPSG:4326_arcgis-China&TILEMATRIX=EPSG:4326_arcgis-China:{z}&TILEROW={y}&TILECOL={x}",
            //     "proxy": "http://data.marsgis.cn/proxy/",  //代理服务，解决跨域问题
            //     "visible": true,
            // });


            // //湖北卫星-arcgis服务
            // var layer = mars3d.layer.createLayer(viewer,{
            //     "name": "xyz图层",
            //     "type": "xyz",
            //     "crs": "EPSG:4490",
            //     "url": "https://localhost:6080/arcgis/rest/services/xxxx/MapServer/tile/{z}/{y}/{x}", 
            //     "minimumLevel": 0,
            //     "maximumLevel": 18,
            //     "visible": true,
            // });
 


        }



    </script>
</body>

</html>